package com.design.pattern.command.projection2;

import java.util.Arrays;
import java.util.List;

public class Client {
    public static void main(String[] args) {
        //先生成执行者集合
        List<CommandExecutor> executors = Arrays.asList(
                new ConcreteCommandExcutor("a"),
                new ConcreteCommandExcutor("b"),
                new ConcreteCommandExcutor("c"),
                new ConcreteCommandExcutor("d")
        );
        //然后生成渠道
        CommandChannel commandChannel=new ConcretetCommandChannel(executors);
        CommandSender commandSender=new ConcreteCommandSender(commandChannel);
        commandSender.send(new Command().setContent("广播体操"));
    }
}
